<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
    <form action="postForm" method="post">
        <input type="text" name="studentId">
        <br>
        <input type="text" name="classId">
        <br>
        <input type="submit" value="提交">
    </form>


    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
    <script>
        // $.ajax({
        //     type: 'post',
        //     //这里是相对路径
        //     url: 'method',
        //     success: function (body, status) {
        //         console.log(body);
        //     }
        // });
    </script>
</body>

</html>